package com.wwtech.epp.ui.activity.work.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.work.ProjectReportActivity;
import com.wwtech.epp.ui.activity.work.contract.ProjectReportContract;
import com.wwtech.epp.ui.activity.work.presenter.ProjectReportPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.work
 * @Description: The moduele of ProjectReportActivity, provide field for ProjectReportActivity
 * @date 2017/10/04 10:03:43
 */
@Module
public class ProjectReportModule {
    private final ProjectReportContract.View mView;


    public ProjectReportModule(ProjectReportContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public ProjectReportPresenter provideProjectReportPresenter(HttpAPIWrapper httpAPIWrapper, ProjectReportActivity mActivity) {
        return new ProjectReportPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public ProjectReportActivity provideProjectReportActivity() {
        return (ProjectReportActivity) mView;
    }
}